<script>
  $('#frm_questions').submit(function() {
  // Enviamos el formulario usando AJAX
        $.ajax({
            type: 'POST',
            url: $(this).attr('action'),
            data: $(this).serialize(),
            // Mostramos un mensaje con la respuesta de PHP
            success: function(data) {
                //$('#frm_new_enc').hide('slow');
                $('#questions').html(data);
            }
        });        
        return false;
    });
</script>
<?php
//atributos form datos
$atrFrm = array('class' => 'form-inline', 'id' => 'frm_questions');
$atrInpQuest = array('class' => 'input-xxlarge','type' => 'text','name' =>'desc_que','required' => 'required','value' => set_value('desc_que'),);
$atributoslbl = array( 'class' => 'control-label');
$atrBtn = array('class' => 'btn btn-warning','type' => 'submit');
echo form_open('encuesta/insert_que',$atrFrm);
echo form_label('Ingrese Pregunta','',$atributoslbl);
echo form_input($atrInpQuest); 
echo form_error('desc_que'); 
echo form_button($atrBtn,'+ Agregar a Encuesta');
echo form_close();




if(!empty($questions_list)){
    foreach ($questions_list as $value) { ?>
<ul>
    <li><?php echo $value->desc_que; ?></li>
</ul>
<?php        
    }
}

?>





<a href="<?php echo base_url().'encuesta/list_enc'?>" class="btn btn-danger">Finalizar</a>